function RequestLoginURL() {
    var params = {};
    params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT;
    params[gadgets.io.RequestParameters.REFRESH_INTERVAL] = 0;
    var url = CalculateBackendBase() + "/users/login-url";
    gadgets.io.makeRequest(url, LoginURLCallback, params);
}

function LoginURLCallback(obj) {
    var login_url = CalculateBackendBase() + "/" + obj.data;
    document.getElementById('iframe_div').innerHTML = "<iframe src=\"" + login_url + "\" width=\"100%\" height=\"100%\">Please upgrade your browser.</iframe>";
}
